package com.cooperate.fly.mapper;

import com.cooperate.fly.bo.Case;
import com.cooperate.fly.bo.CaseWithBLOBs;
import com.cooperate.fly.bo.TableWithBLOBs;
import com.cooperate.fly.datasource.SqlMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@SqlMapper
public interface CaseMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Case record);

    int insertSelective(Case record);

    Case selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Case record);

    int updateByPrimaryKey(Case record);

    List<Case> selectAll();

    //防止创建数据库时table_schemaId创建失败
    int createTable(@Param("table_name") String table_name);

    List<CaseWithBLOBs> selectBySchemaId(@Param("schemaId") Integer schemaId, @Param("caseType") Integer caseType);

    List<Case> selectAllBySchemaId(@Param("schemaId") int schemaId);

    int updateTime(CaseWithBLOBs record);

    List<CaseWithBLOBs> selectByParentId(Integer parentId);

    Case selectByNameAndParentId(@Param("name")String name, @Param("parentId")int parentId);

    int deleteBySchemaId(int sid);

    int updateCaseName(Case _case);

    int updatePath(@Param("path") String path, @Param("id") int id);

}